From 455e8b7f10e1837cc08655a2115a6f58ccb3aad0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 8 Apr 2011 16:38:06 +0100 Subject: [PATCH] libxl: remove impossible check for backend != DISK_BACKEND_QDISK In this case we are already in the DISK_BACKEND_QDISK case of a switch statement on the same variable. It is possible that we fell through from the DISK_BACKEND_TAP case (although I'm about to remove that in a subsequent patch), however in that case we are explicitly falling back from blktap2 to qdisk so DEVICE_QDISK is still the right answer. Signed-off-by: Ian Campbell Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/libxl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 021959aded..1d4bff3871 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1016,12 +1016,7 @@ int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *dis flexarray_append(back, "params"); flexarray_append(back, libxl__sprintf(&gc, "%s:%s", libxl__device_disk_string_of_format(disk->format), disk->pdev_path)); - - if (libxl__blktap_enabled(&gc) && - disk->backend != DISK_BACKEND_QDISK) - device.backend_kind = DEVICE_TAP; - else - device.backend_kind = DEVICE_QDISK; + device.backend_kind = DEVICE_QDISK; break; default: LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "unrecognized disk backend type: %d\n", disk->backend); -- 2.30.2